import service from '@/utils/request'

// @Tags UserDetails
// @Summary 创建用户资料
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.UserDetails true "创建用户资料"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"创建成功"}"
// @Router /userDetails/createUserDetails [post]
export const createUserDetails = (data) => {
  return service({
    url: '/userDetails/createUserDetails',
    method: 'post',
    data
  })
}

// @Tags UserDetails
// @Summary 删除用户资料
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.UserDetails true "删除用户资料"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /userDetails/deleteUserDetails [delete]
export const deleteUserDetails = (params) => {
  return service({
    url: '/userDetails/deleteUserDetails',
    method: 'delete',
    params
  })
}

// @Tags UserDetails
// @Summary 批量删除用户资料
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body request.IdsReq true "批量删除用户资料"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /userDetails/deleteUserDetails [delete]
export const deleteUserDetailsByIds = (params) => {
  return service({
    url: '/userDetails/deleteUserDetailsByIds',
    method: 'delete',
    params
  })
}

// @Tags UserDetails
// @Summary 更新用户资料
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.UserDetails true "更新用户资料"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"更新成功"}"
// @Router /userDetails/updateUserDetails [put]
export const updateUserDetails = (data) => {
  return service({
    url: '/userDetails/updateUserDetails',
    method: 'put',
    data
  })
}

// @Tags UserDetails
// @Summary 用id查询用户资料
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data query model.UserDetails true "用id查询用户资料"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
// @Router /userDetails/findUserDetails [get]
export const findUserDetails = (params) => {
  return service({
    url: '/userDetails/findUserDetailsOnWeb',
    method: 'get',
    params
  })
}
export const findUserApproval = (params) => {
  return service({
    url: '/userDetails/updateUserStatus',
    method: 'get',
    params
  })
}
// @Tags UserDetails
// @Summary 分页获取用户资料列表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data query request.PageInfo true "分页获取用户资料列表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /userDetails/getUserDetailsList [get]
export const getUserDetailsList = (params) => {
  return service({
    url: '/userDetails/getUserDetailsList',
    method: 'get',
    params
  })
}
